package com.gobo.orderservice.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ContantsPayParamsUtils implements InitializingBean {

    @Value("${weixin.pay.appid}")
    private String wxAppId;

    @Value("${weixin.pay.partner}")
    private String wxPartner;

    @Value("${weixin.pay.partnerkey}")
    private String wxPartnerKey;

    @Value("${weixin.pay.notifyurl}")
    private String wxNotifyUrl;


    public static String WX_APPID;
    public static String WX_PARTNER;
    public static String WX_PARTNERKEY;
    public static String WX_NOTIFYURL;


    @Override
    public void afterPropertiesSet() throws Exception {
        WX_APPID = wxAppId;
        WX_PARTNER = wxPartner;
        WX_PARTNERKEY = wxPartnerKey;
        WX_NOTIFYURL = wxNotifyUrl;
    }
}
